<template>
  <div class="data-container">
    <div class="title">总投票数{{ coreStatsObj.totalVote }}个</div>
    <div class="vote-info">({{ coreStatsObj.changeDesc }}个)</div>
  </div>
</template>

<script setup>
import { ref, onMounted, computed } from "vue";
import { getCoreStats } from "@/api/business/dashboard";

const coreStatsObj = ref({});

// 获取数据
onMounted(async () => {
  getCoreStats().then((response) => {
    coreStatsObj.value = response.data;
  });
});
</script>

<style scoped>
.data-container {
  margin-left: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 120px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid #ddd;
  box-sizing: border-box;
}
.title {
  font-size: 14px;
  color: #666;
}
.vote-info {
  font-size: 14px;
  color: #333;
  font-weight: 500;
  color: #165dff;
}
</style>
